<template>
  <div
    v-loading="loading"
    class="els-table"
    :element-loading-text="loadingText"
    ref="container">
    <template v-if="fullPage">
      <el-table
        style="width:100%"
        :data="tableData"
        :height="height"
        ref="table"
      >
        <slot />
      </el-table>
    </template>
    <template v-else>
      <el-table
        style="width:100%"
        :data="tableData"
        ref="table"
      >
        <slot />
      </el-table>
    </template>
    <el-pagination>
      <div></div>
    </el-pagination>
  </div>
</template>
<script>
export default {
  name:'Table',
  data(){
    return{
      tableData:[],
      total:0,
      currentPage:1,
      loading:true,
      pgsize:this.pageSize,
      query:{},
      height:300,
      scrollTop:0
    }
  },
  props:{
    pageSize:{
      type:Number,
      default:10
    },
    pageSizes:{
      type:Array,
      default(){
        return  [10,20,30]
      }
    },
    urls:{
      type:String,
      default:''
    },
    method:{
      type:String,
      default:'post'
    },
    params:{
      type:Object,
      default(){
        return{}
      }
    },
    fullPage:{
      type:Boolean,
      default:false
    },
    loadingText:{
      type:String,
      default:'数据加载中'
    },
    layout:{
      type:String,
      default:'total,slot,prev,pager,next,jumper'
    }
  }
}
</script>
<style lang="scss" scoped>

</style>